<div id="index_page">			
				<table>
						
						<tr class="first-header">
							<td> Customer </td>
							<td> Customer Email </td>
							<td> Customer Tel </td>
							<td> Company Name </td>
							<td> Company Email </td>
							<td> Actions </td>				
						</tr> 
						<?php
						$agent_list = db_select_all_data_order("agents");
						$home_url = get_bloginfo('home');
						if($agent_list)
						{ 
							foreach ($agent_list as $value) 
							{
								$customers = db_select_data_by_int("customers", "ID", $value->customerID);
								
							?>
							<tr class="item-second">
								<td> <?php echo $customers[0]->customerName;?></td>
								<td> <?php echo $customers[0]->customerEmail;?></td>
								<td> <?php echo $customers[0]->customerPhone;?></td>
								<td> <?php echo $value->companyName;?></td>
								<td> <?php echo $value->companyEmail;?></td>
								<td>							
									<a href="<?php echo $home_url;?>/wp-admin/admin.php?page=travel-agent-setting&agent=<?php echo $value->ID;?>&cus=<?php echo $customers[0]->ID;?>">View</a> &nbsp;|&nbsp;
									<a href="<?php echo $home_url;?>/wp-admin/admin.php?page=travel-agent-setting&del=<?php echo $value->ID;?>&cus=<?php echo $customers[0]->ID;?>">Delete</a>
								</td>								
							</tr>
							<?php 
							}						
						} 
						?>
					</table>	
				</div>  